'use strict';
exports = module.exports = function ($scope, $rootScope, $timeout, $alert, $state, $notify, yxtable14, $API, throttleSubmit, $rule) {
    $scope.Rule = $rule;
    $scope.frm = {
        // 表单项: 用户名
        username: '我的兄弟叫顺溜',
        // 表单项: 账号
        account: '1232 1231 2312 3123 1231 23',
        // 表单项: 中奖概率
        rote: '12',
        // 表单项: 密码
        pw: 'aaaaaaa',
        pw2: 'aaaaaaa',
    }
    if($scope.frm.pw) $scope.frm.pw = '******'
    if($scope.frm.pw2) $scope.frm.pw2 = '******'
    $scope.frm2 = {
    }
    $scope.submitFun = throttleSubmit(function(){
        $scope.From.submitted = true;
        if( $scope.From.$invalid ) {
            $alert.error('请检查提交的信息')
            return false;
        }
        return $scope.frm
    },function(enable, param){
        console.log('提交代码', param)
        $timeout(function(){
            enable()
            window.fromCacheObj['makeform7'] = []
        },3e3)
    });
    $scope.cancelFun = function(){
        $alert.confirm("是否取消编辑？", function(close){
            // $go('app.make.maketable1');
            close();
            window.fromCacheObj['makeform7'] = []
        })
    };
}